﻿#region Using

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;

using Gizmox.WebGUI.Common;
using Gizmox.WebGUI.Forms;

#endregion

namespace Agresso.Interface.Layer.Web
{
    public partial class LoginForm : Form
    {
        MainForm m_mainForm;

        public LoginForm()
        {
            InitializeComponent();
            textBoxMessage.Visible = false;
        }

        private void buttonLogin_Click(object sender, EventArgs e)
        {
            if (textBoxUserCode.Text.ToLower() == "admin" && textBoxPassword.Text == "admin1234")
            {
                this.Hide();
                m_mainForm = new MainForm();
                m_mainForm.Dock = DockStyle.Fill;
                m_mainForm.Show();
            }
            textBoxMessage.Text = "The user name or password you entered isn't correct. Try entering it again.";
            textBoxMessage.Visible = true;
            textBoxUserCode.SelectAll();

        }

        private void LoginForm_Load(object sender, EventArgs e)
        {
            textBoxUserCode.Focus();
        }
    }
}